package com.bw.mapper;

import com.bw.bean.Vo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VoMapper {

    @Select("select  bt.name,oi.total_amount value from  order_info oi\n" +
            "left join base_trademark bt on oi.tm_id=bt.id\n" +
            "group by bt.name,oi.total_amount;")
    List<Vo> getList1();

    @Select("select  ui.birthday name,oi.total_amount value  from  order_info oi\n" +
            "left join user_info ui on oi.user_id = ui.id\n" +
            "group by ui.birthday,oi.total_amount;;")
    List<Vo> getList2();

    @Select("select bp.name,sum(oi.total_amount) value from order_info oi\n" +
            "left join base_province bp on oi.province_id = bp.id\n" +
            "group by bp.name;")
    List<Vo> getList3();
}
